//import java.util.Scanner;

import java.util.Random;
import java.util.Scanner;

public class TestDemo13 {
    public static void main(String[] args) {
        Random random = new Random();
        int rand = random.nextInt(50)+50;
        Scanner scanner = new Scanner(System.in);
        while (true){
            System.out.println("输入你要猜的数字：");
            int n = scanner.nextInt();
            if (n < rand){
                System.out.println("猜小了");
            }
            if (n > rand){
                System.out.println("猜大了");
            }
            if (n == rand){
                System.out.println("猜对了");
                break;
            }
        }
    }
    public static void main18(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()){
            int n = scanner.nextInt();
            System.out.println(n);
        }
    }
    public static void main17(String[] args) {
        int i = 1;
        do{
            System.out.println(i);
            i++;
        }while (i <= 10);
    }
    public static void main16(String[] args) {
        int sum = 0;
        for (int j = 1; j <= 5; j++){
            int ret = 1;
            for (int i = 1; i <= j; i++){
                ret *= i;
            }
            sum += ret;
        }
        System.out.println(sum);
    }
    public static void main15(String[] args) {
        int ret = 1;
        for (int i = 1; i <= 5; i++){
            ret *= i;
        }
        System.out.println(ret);
    }
    public static void main14(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 100; i++){
            sum += i;
        }
        System.out.println(sum);
    }
    public static void main13(String[] args) {
        for (int i = 1; i <= 10; i++){
            System.out.println(i);
        }
    }
    public static void main12(String[] args) {
        int i = 100;
        while (i <= 200){
            if (i % 3 != 0){
                i++;
                continue;
            }
            System.out.println(i);
            i++;
        }
    }
    public static void main11(String[] args) {
        int i = 100;
        while (i <= 200){
            if (i % 3 == 0){
                System.out.println(i);
                break;
            }
            i++;
        }

    }
    public static void main10(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        int n = scanner.nextInt();
        int j = 1;
        int sum = 0;
        while (j <= 5){
            int i = 1;
            int ret = 1;
            while (i <= j){
                ret *= i;
                i++;
            }
            sum += ret;
            j++;
        }
        System.out.println(sum);
    }
    public static void main9(String[] args) {
        int j = 1;
        int sum = 0;
        while (j <= 5){
            //int n = j;
            int i = 1;
            int ret = 1;
            while (i <= j){
                ret *= i;
                i++;
            }
            sum += ret;
            j++;
            //System.out.println(ret);
        }
        System.out.println(sum);
    }
    public static void main8(String[] args) {
        int i = 1;
        int ret = 1;
        while (i <= 5){
            ret *= i;
            //System.out.println(sum);
            i++;
        }
        System.out.println(ret);
    }
    public static void main7(String[] args) {
        int i = 1;
        int sum = 0;
        while (i <= 100){
            sum += i;
            //System.out.println(sum);
            i++;
        }
        System.out.println(sum);
    }
    public static void main6(String[] args) {
        int i = 1;
        while (i <= 10){
            System.out.println(i);
            i++;
        }
    }
    public static void main5(String[] args) {
        int day = 1;
        switch (day){
            case 1:
                System.out.println("星期一");
                break;
            case 2:{
                System.out.println("星期二");
                break;
            }
            case 3:
                System.out.println("星期三");
                break;
            case 4:
                System.out.println("星期四");
                break;
            case 5:
                System.out.println("星期五");
                break;
            case 6:
                System.out.println("星期六");
                break;
            case 7:
                System.out.println("星期七");
                break;
            default:
                System.out.println("输入有误");
                break;

        }
    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        if (year % 100 != 0 && year % 4 == 0 || year % 400 ==0) {
            System.out.println("year是闰年");
        }else{
            System.out.println("year不是闰年");
        }
        scanner.close();
    }
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        if (year % 100 == 0 && year % 400 == 0) {
            System.out.println("year是闰年");
        }else{
            if (year % 4 == 0){
                System.out.println("year是闰年");
            }else {
                System.out.println("year不是闰年");
            }
        }
    }
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        if (year % 100 == 0 && year % 400 == 0 || year % 4 == 0){
            System.out.println("year是闰年");
        }else {
            System.out.println("year不是闰年");
        }
    }
    public static void main1(String[] args) {
        /*Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        if (n % 2 == 0){
            System.out.println("n是偶数");
        }else{
            System.out.println("n不是偶数");
        }*/
        /*int n = 10;
        if (n > 0){
            System.out.println("n是正数");
        }else if(n < 0){
            System.out.println("n是负数");
        }else{
            System.out.println("n是0");

        }*/
        int year = 1000;
        if (year % 100 == 0) {
            if (year % 400 == 0) {
                System.out.println("year是闰年");
            }else{
                System.out.println("year不是闰年");
            }
        }else{
            if (year % 4 == 0){
                System.out.println("year是闰年");
            }else{
                System.out.println("year不是闰年");
         }
        }

    }
}
